-
Notifications
You must be signed in to change notification settings - Fork 16
Documentation overhaul #444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
First attempt at using Considerations:
|
I notice the side menus are missing. I'm also not sure where functions like tenones are documented. Maybe they aren't. They don't seem to be linked. I also don't seem to be able to click through on the functions in the tables to their detailed documentation. I guess it's all there, but it's hard to get to. |
It seems like something is different on RTD. Locally, the nav bar (toctree) is available. Just not online. I'll work to fix that. |
Getting closer on the docs with the nav bar (toctree) being populated now. But there are still warnings in doc generation and all of the method documentation is still appearing in the class documentation (as opposed to just the autosummaries). |
One other issue is that the autosummary tables for methods do not pick up the special members, so dunder methods will not appear in the table. |
In Reference in the docs, just look at |
My primary concern is on the level of upkeep. I'm fine on whatever aesthetics people agree on as long as there is some semi-automated way to enforce it. For upkeep this looks great. If we wanted to go one level deeper (specify an initial page for each class so we can get the nested methods), that is where I had an issue with our file/class naming indirection issues. I generated a If we think the current level of nesting is fine then no concern from me. |
I'm not sure the advantage of autosummary. I see several disadvantages. The main advantage I anticipated is that it would put each function on its own page, but it didn't do that. The disadvantage is that you've now lost the ability to easily document the functions that are in the file but not in the class (like tenones). It looks also like like the init help has been moved up to the class level. That shouldn't be necessary. We talked about just having the one-liner at the class level and then the rest at the function level. Why the change? Additionally, the 'attributes' section was removed and replaced by 'parameters', but these are 2 different things. Now the attributes of data and shape have no description in the attribute table. Given that there are only a handful of classes, I'm not sure the autosummary is worth the extra effort. This is assuming I'm understand what it's doing. |
Suggestion: Do no use I'd rather maintain control over what we want in our docs, and I think we can more easily accomplish this currently without the use of @ntjohnson1 I tried many combinations of the @tgkolda I moved the all docs from class/ @tgkolda I agree about the Attributes documentation. I plan to tag this branch as the end of the |
As I move away from
If we use the alphabetical ordering of methods in the toctree, attributes/properties are mixed in with methods and dunder methods appear first (which I do not like). I think that determining the flow of the toctree layout via the layout of the source code is a better option. @tgkolda, @ntjohnson1 Please review and comment on the suggested layout |
Hey Danny, Great progress. I know that sphinx is painful. Here are problems I notice...
|
@tgkolda Sorry, it may not have been clear in my previous message ... I have not yet changed anything from the @tgkolda As for property vs. method, we use properties to define class methods that return values and act like data members but are derived/computed values. So, for |
Suggested layout seems fine to me. Once we have a proof of concept that works probably worth documenting in the contributing docs, and see if there's an easy way to enforce it (or else checking just falls to you manually in review) but those are future steps |
@ntjohnson1 I am unable to get sphinx to build without warnings about references in nitpicky mode ( I am following the doc build info from CONTRIBUTING.md, which was changed to the following recently in #432 :
However, the build on RTD does not use nitpicky mode (see recent build):
Attached (link below) is what I get in nitpicky mode (also building from scratch using Any ideas? |
Hmm nitpicky mode passed for me locally off that PR and I thought I had set it up to be enforced by CI but I guess not. I should have time later this weekend to take a look. I think nitpicky mode is nice to avoid regressions but we can disable if it causes too much headache. |
I did not look at all 60+ warnings, but the ones I did check seemed to link correctly in the HTML, so I am suspicious this is some kind of signal crossing between the type hints and the intersphinx linking. At least, the intersphinx linking seems to be related to the warnings; maybe related to the change from using Since the WARNINGs do not actually lead to a problem rendering the html output currently, I am going to continue with doc overhaul for now unless this rears its head on output. Let me know what you find. And if you keep passing without warnings, can you provide the versions of python and sphinx packages you are using? |
TLDR big mess and lets disable the nitpicky stuff. Longer digging into it:
|
This PR is aimed at creating a consistent documentation across the
pyttb
classes and algorithms.To that end, here are some tasks to complete:
autosummary
in the Sphinx documentation📚 Documentation preview 📚: https://pyttb--444.org.readthedocs.build/en/444/